-- GENERATED SPELL FOR [Alyson Antille] --


function spell0_24240(pUnit, Event) --@Arcane Torrent,Self--
pUnit:FullCastSpellOnTarget(33390,pUnit)
pUnit:RegisterEvent('Sorts_24240', 2289, 1)
end

function spell1_24240(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(43577,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24240', 574, 1)
end

function spell2_24240(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(43575,pUnit)
pUnit:RegisterEvent('Sorts_24240', 2000, 1)
end

function Sorts_24240(pUnit, Event)
local choix_sorts_24240 = math.random(0, 2)
if choix_sorts_24240 == 0 then
pUnit:RegisterEvent('spell0_24240', 1, 1)
end
if choix_sorts_24240 == 1 then
pUnit:RegisterEvent('spell1_24240', 1, 1)
end
if choix_sorts_24240 == 2 then
pUnit:RegisterEvent('spell2_24240', 1, 1)
end
end

function mob24240_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24240', math.random(1500, 3000), 1)
end

function mob24240_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24240_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24240_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24240, 1, 'mob24240_Action')
RegisterUnitEvent(24240, 2, 'mob24240_Leave')
RegisterUnitEvent(24240, 3, 'mob24240_Kill')
RegisterUnitEvent(24240, 4, 'mob24240_Die')
